package com.ykh.mybbsdemo.controller;

import com.ykh.mybbsdemo.service.LoginService;
import com.ykh.mybbsdemo.dao.pojo.vo.Result;
import com.ykh.mybbsdemo.dao.pojo.dto.LoginParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-08-30
 * Time: 21:08
 */
@RestController
@RequestMapping("login")
public class LoginController {

    @Autowired
    private LoginService loginService;

    @PostMapping
    public Result login(@RequestBody LoginParam loginParam) {
        //登录 验证用户 访问用户表
        return loginService.login(loginParam);
    }
}
